﻿using WidgetsDesign.API.DataBase;
using WidgetsDesign.API.Models;

namespace WidgetsDesign.API.Services
{
    public class UploadFileRepository:IUploadFileRepository
    {
        private readonly AppDbContext _context;
        public UploadFileRepository(AppDbContext context)
        {
            _context = context;
        }
        public void CreateFile(UploadFile uploadFile)
        {
            _context.UploadFile.Add(uploadFile);
        }
        public void DeleteFile(Guid Uuid)
        {
            
        }
        public async Task<bool> SaveAsync()
        {
            return (await _context.SaveChangesAsync() >= 0);
        }
    }
}
